package task4;

import java.util.Scanner;

/**
 * @Author Stranger
 * @Date 2021/10/15 13:01
 * @Description This is description of method
 * @Since 子串在母串中出现的次数
 */
public class Task4 {

    static Scanner input=new Scanner(System.in);
    public static void main(String[] args) {
        String sup=input.nextLine();
        String sub=input.nextLine();
        System.out.println(times(sup,sub));
    }

    private static int times(String sup, String sub) {
        int point=0;
        int count=0;
        for(int i=0;i<sup.length();i++)
        {
            if(sup.charAt(i)==sub.charAt(point))
            {
                point++;
                if(point==sub.length())
                {
                    point=0;
                    count++;
                }

            }
            else {
                point=0;
            }
        }
        return count;
    }
}
